package com.fong.spring_cloud_producer;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 对外暴露的接口
 * 
 * @author fong
 *
 */
@RestController
public class HelloController {

	@Value( "${server.port}" )
	private String port;

	@RequestMapping( "/hello" )
	String hello( @RequestParam String name ) {
		//System.err.println( port + ":Hello " + name + ", this is aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa message!" );
		return port + ":Hello " + name + ", this is aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa message!";
	}

}
